<template>
  <view class="heat-wave">
    <view 
      v-for="i in 3" 
      :key="i"
      class="wave"
      :style="{
        width: `${size}px`,
        height: `${size}px`,
        animationDelay: `${i * 0.5}s`
      }"
    ></view>
    <text class="heat-text">🔥 {{ heat }}热度</text>
  </view>
</template>

<script>
export default {
  props: {
    heat: {
      type: Number,
      default: 0
    }
  },
  data() {
    return {
      size: 100
    }
  },
  mounted() {
    // 根据热度调整波浪大小
    this.size = Math.min(200, 100 + this.heat / 50)
  }
}
</script>

<style scoped>
.heat-wave {
  position: absolute;
  top: 50rpx;
  right: 50rpx;
  z-index: 10;
}

.wave {
  position: absolute;
  border: 2px solid rgba(255, 100, 100, 0.8);
  border-radius: 50%;
  animation: wave 2s infinite ease-out;
  transform: translate(-50%, -50%);
}

@keyframes wave {
  0% {
    transform: scale(0.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

.heat-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #FF5C8D;
  font-weight: bold;
  font-size: 24rpx;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}
</style>